package Practice16;

public class ArrayTools {
    public static int getElement(int[] arr, int index) {
        if (index < 0 || index > arr.length - 1) {
            throw new ArrayIndexOutOfBoundsException("数组越界");
        }

        int element = arr[index];
        return element;
    }
}
